package com.miyu.system.pojo.book;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

import lombok.Data;
/**
 * 书籍主信息;
 * @author : miyu
 * @date : 2022-11-18
 */
@ApiModel(value = "书籍主信息",description = "")
@Data
@Entity
@Table(name="book_main",indexes = {
        @Index(name = "index_book_main_search",columnList = "book_name,book_author"),
        @Index(name = "index_book_main_kind",columnList = "book_kind")
})
public class BookMain implements Serializable,Cloneable{
    /** 主键 */
    @Id
    @ApiModelProperty(name = "主键",notes = "")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "book_id", nullable = false  )
    private Integer bookId ;
    /** 规则来源 */
    @ApiModelProperty(name = "规则来源",notes = "")
    @Column(name = "rule_id", nullable = false, length =32 )
    private String ruleId ;
    /** 辅助主键;辅助主键 */
    @ApiModelProperty(name = "辅助主键",notes = "辅助主键")
    @Column(name = "fpk", nullable = false, length =32 )
    private String fpk ;
    /** 章节表;章节所在表 */
    @ApiModelProperty(name = "章节表",notes = "章节所在表")
    @Column(name = "book_chapter_source", nullable = true, length =100 )
    private String bookChapterSource ;
    /** 数据来源;来源地址 */
    @ApiModelProperty(name = "数据来源",notes = "来源地址")
    @Column(name = "book_source", nullable = true, length =150 )
    private String bookSource ;
    /** 书名 */
    @ApiModelProperty(name = "书名",notes = "")
    @Column(name = "book_name", nullable = true, length =90 )
    private String bookName ;
    /** 作者 */
    @ApiModelProperty(name = "作者",notes = "")
    @Column(name = "book_author", nullable = true, length =90 )
    private String bookAuthor ;
    /** 书籍类型 */
    @ApiModelProperty(name = "书籍类型",notes = "")
    @Column(name = "book_kind", nullable = true, length =90 )
    private String bookKind ;
    /** 书籍状态 */
    @ApiModelProperty(name = "书籍状态",notes = "")
    @Column(name = "book_state", nullable = true, length =20 )
    private String bookState ;
    /** 封面图片 */
    @ApiModelProperty(name = "封面图片",notes = "")
    @Column(name = "book_cover", nullable = true, length =150 )
    private String bookCover ;
    /** 书籍简介 */
    @ApiModelProperty(name = "书籍简介",notes = "")
    @Column(name = "book_duce", nullable = true, length =2500 )
    private String bookDuce ;
    /** 更新日期 */
    @ApiModelProperty(name = "更新日期",notes = "")
    @Column(name = "update_date", nullable = true, length =20 )
    private String updateDate ;
    /** 创建日期 */
    @ApiModelProperty(name = "创建日期",notes = "")
    @Column(name = "create_date", columnDefinition = "timestamp default current_timestamp",nullable = false)
    private Timestamp createDate;
}